// import Cookies from 'js-cookie'

// const TokenKey = 'vue_admin_template_token'

// export function getToken() {
//   return Cookies.get(TokenKey)
// }

// export function setToken(token) {
//   return Cookies.set(TokenKey, token)
// }

// export function removeToken() {
//   return Cookies.remove(TokenKey)
// }

const TOKEN_KEY = "token"
const USER_INFO = "info"

export function getToken() {
  return window.localStorage.getItem(TOKEN_KEY)
}
export function setToken(data) {
  window.localStorage.setItem(TOKEN_KEY,data)
}
export function removeToken() {
  window.localStorage.removeItem(TOKEN_KEY)
}

export function getInfo() {
  return JSON.parse(window.localStorage.getItem(USER_INFO))
}
export function setInfo(data) {
  window.localStorage.setItem(USER_INFO,data)
}
export function removeInfo() {
  window.localStorage.removeItem(USER_INFO)
}
